export default [
  {
    path: '/Sys',
    name: '系统功能',
    access: 'canUser',
    hideInMenu: true,
    routes: [
      { name: '系统通知', path: '/Sys/notification', component: './User/SysMessages' },
      { name: '个人信息', path: '/Sys/sysUserInfo', component: './User/SysUserInfo' },
    ],
  },
  {
    path: '/user',
    layout: false,
    routes: [
      { name: '登录', path: '/user/login', component: './User/Login' },
      { name: '注册', path: '/user/register', component: './User/Register' },
    ],
  },
  { path: '/welcome', name: '欢迎', icon: 'smile', component: './Welcome' },
  {
    path: '/admin',
    name: '系统管理',
    icon: 'crown',
    access: 'canAdmin',
    routes: [
      { path: '/admin', redirect: '/admin/user' },
      { icon: 'table', path: '/admin/user', component: './Admin/User', name: '用户管理' },
      {
        icon: 'table',
        path: '/admin/Sys-logininfo',
        component: './Admin/SysLoginInfo',
        name: '系统登录日志',
      },
      {
        icon: 'table',
        path: '/admin/Sys_SysOperLog',
        component: './Admin/SysOperLog',
        name: '系统操作日志',
      },
      {
        icon: 'table',
        path: '/admin/sys-announcement',
        component: './Sys/SysAnnouncement',
        name: '系统公告',
      },
    ],
  },
  { icon: 'crown', path: '/admin/task-list', component: './Admin/TaskList', name: '任务清单' },
  {
    path: '/bi',
    name: '智能分析',
    icon: 'DotChartOutlined',
    access: 'canUser',
    routes: [
      { path: '/bi', redirect: '/bi/add-chart' },
      {
        icon: 'DotChartOutlined',
        path: '/bi/add-chart',
        component: './Bi/AddChart',
        name: '创建图表',
      },
      {
        icon: 'DotChartOutlined',
        path: '/bi/add-chart-async',
        component: './Bi/AddChartAsync',
        name: '创建图表（异步）',
      },
      {
        icon: 'DotChartOutlined',
        path: '/bi/my-chart',
        component: './Bi/MyChart',
        name: '我的图表',
      },
      {
        icon: 'DotChartOutlined',
        path: '/bi/chart-data-detail/:chartId',
        component: './Bi/ChartDataDetail',
        name: '图表详情',
        hideInMenu: true,
      },
      {
        icon: 'DotChartOutlined',
        path: '/bi/statistics',
        component: './Bi/Statistics',
        name: 'AI服务调用统计分析',
        access: 'canAdmin',
      },
      {
        icon: 'DotChartOutlined',
        path: '/bi/products',
        component: './Bi/Products',
        name: 'BI产品管理',
        access: 'canAdmin',
      },
      {
        icon: 'DotChartOutlined',
        path: '/bi/products/order',
        component: './Bi/Products/Order',
        name: 'BI产品订单',
        access: 'canAdmin',
      },
      {
        icon: 'DotChartOutlined',
        path: '/bi/my-service-usage',
        component: './Bi/MyServiceUsage',
        name: '我的服务',
        hideInMenu: true,
      },
    ],
  },
  { path: '/', redirect: '/welcome' },
  { path: '*', layout: false, component: './404' },
];
